package cn.wolfcode.mq;

import cn.wolfcode.web.controller.OrderInfoController;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Component
@Slf4j
@RocketMQMessageListener(consumerGroup = "MQChangeSizeListener",topic = MQConstant.CANCEL_SECKILL_OVER_SIGE_TOPIC)
public class MQChangeSizeListener implements RocketMQListener<Long> {

    @Override
    public void onMessage(Long seckill) {
        log.info("进入修改本地标识列表");
        OrderInfoController.local_map.put(seckill,false);
    }
}
